Script generating system and method

ABSTRACT

A method includes receiving data from a user indicating a selection of a procedure, automatically selecting at least one template to implement the procedure, and extracting table structure information related to the procedure from a database management system dictionary. The method further includes manipulating the table structure information and automatically incorporating the manipulated table structure information into the at least one template to generate a modified template.

RELATED APPLICATIONS

The present application is a continuation of and claims priority to U.S.patent application Ser. No. 10/458,466, filed Jun. 10, 2003, thecontents of which are incorporated by reference in their entirety.

FIELD OF THE DISCLOSURE

The present disclosure relates generally to a script generating systemand method.

BACKGROUND

As is well known, computer scripts, also referred to as macros or batchfiles, are lists of commands that can be executed without userinteraction. A script language is a simple programming language withwhich a programmer can write scripts. Examples thereof include BASIC, C,C++, COBOL, FORTRAN, ADA, and PASCAL. Each language has a unique set ofkey words (words that it particularly understands) and a special syntaxorganizing program instructions. A script generator generates either acomplete computer program written in a prescribed programming languageor a portion thereof.

Previously, to avoid writing a complete program or a complete script, aprogrammer would start a project by either reusing some previous codethat was similar to the current project request or by going to arepository of standard templates. The programmer then proceeds with thetime consuming task of replacing mirrored code with new variables. Asingle project may take a programmer hours or even days to complete,depending on how much rework must be done on the acquired code.

The disadvantages associated with current script generating techniqueshave made it apparent that a new technique to generate scripts in such amanner to reduce required user input or reworking of previously writtencode is desirable. The new technique should facilitate the writing ofcode by automatically updating old or previously used code.

SUMMARY OF THE INVENTION

The present invention provides a method for automating systemadministration operations for use as a script generator. The presentinvention also provides a system for implementing the script generator.

In accordance with one aspect of the present invention, a scriptgenerating system includes a data dictionary adapted to include tablestructure data. A database management system runs a script generator,which includes a plurality of user defined templates. Activation of thescript generator utilizes built-in macros within the database managementsystem and extracts the table structure data. Responsively, one of thetemplates manipulates the table structure data to generate a script.

In accordance with another aspect of the present invention, a method forgenerating a script includes running a built-in macro for RDBMSarchitecture dictionary retrieval, and extracting table structure datafrom a RDBMS architecture dictionary. The table structure data is thenconverted into an alternate programming language file layout andarranged within a predefined template. Ultimately, a script is generatedfrom the predefined template.

One advantage of the present invention is that it takes the manualeffort of script building, maintenance of database structures andautomates it. A further advantage is that the present invention allowsprogrammers to build personalized collections of local templates.Additional advantages and features of the present invention will becomeapparent from the description that follows and may be realized by theinstrumentalities and combinations particularly pointed out in theappended claims, taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present invention, referencewill now be made to the embodiments illustrated in greater detail in theaccompanying figures and described below by way of examples of theinvention wherein:

FIG. 1 is a schematic view of the script generator for automating systemadministration operations in accordance with one embodiment of thepresent invention; and

FIG. 2 is a logic flow diagram of a method for automating systemadministration operations in accordance with another embodiment of thepresent invention.

DETAILED DESCRIPTION

The present invention is illustrated with respect to a script generatorfor automating system administration operations particularly suited todata management. The present invention is, however, applicable tovarious other uses that may require system administration operations, aswill be understood by one skilled in the art.

Referring to FIG. 1, a system for automating system administrationoperations (script generating system 10), including a script generator12, is illustrated in accordance with one embodiment of the presentinvention. The system 10 also includes a host server 14, a database 24,a remote server 18, and a database generator 26, all of which areelectrically coupled together.

The host server 14 may include the database 16, the script generator 12,and the database generator 26, or alternately the host server 14 may bea remote unit from any or all of the aforementioned components.

The script generator 12 may be included within the server 14 oralternately included in a separate unit. The script generator 12includes a number of templates 22. The script generator 12 is designedsuch that the templates 22 may be edited, deleted, or stored in adifferent of permanent storage unit, The script generator 12 ideallyruns on a relational database management system (RDBMS) or databasemanagement system (DBMS), and may incorporate data architectures, suchas Teradata.

The script generator 12 includes Teradata in one embodiment of thepresent invention. Teradata is a database management system (DBMS)created by NCR Corporation. It includes both custom hardware and customsoftware. A Teradata DBMS is useful because it can handle more than 1terabyte of data, which is why it is used a lot in very large scale datawarehousing applications. Essentially, Teradata is a parallelarchitecture used to efficiently store, retrieve, and process largevolumes of data.

The script generator 12 may include a DBMS, which is a computer program(or more typically, a suite of them) designed to manage a database, alarge set of structured data, and run operations on the data requestedby numerous users. Typical examples of DBMS uses include: accounting,human resources, and customer support systems. An alternate embodimentof the present invention includes an RDB MS, which is a type of DBMSthat stores data in the form of related tables.

The templates 22 are stored within the script generator 12. Examples ofthe templates 22 include an auto load feature to auto load a specificfile, a create duplicate copy from a dictionary table layout to generatea backup copy for editing of either the original or the duplicate, amulti-load delete to include a delete that works off a separate filewhereby a parallel connection between the two files can result in aparallel deletion of data within the files, a template for collectingstatistics on columns and upfront optimizations, a template with asyntax that purges data from a table or other template thereby allowingtwo templates to link together, a template including the secondary indexthat allows storing of data on a table or removing data on a table for aseparate fast load procedure then reincorporating the data, a templateto replace or update the template with a new template, and a template toclean or filter out data. Important to note is that numerous othertemplates may be designed and incorporated in a system embodied herein.

These templates 22 generate error-free scripts for an infinite number oftable structures by incorporating and manipulating dictionaryinformation from the dictionary 20. The script generator 12 also allowsusers at remote servers 18 to download the templates 22 and generate newtemplates or user-defined templates using predefined variables, such asthe ones used in the templates 22. The templates 22 may also call othertemplates into the templates 22 as variables, thereby allowing the userto quickly assemble repetitive, complex script logic solely fromdictionary information.

The database dictionary 20, which may be a Teradata data dictionary, asmost other RDBMS architectures are, holds information regarding tablestructures (i.e. column names, data types, formatting, default values,primary index, secondary index, column statistics, views, etc.). Byutilizing built-in macros for dictionary retrieval, dictionaryinformation can be obtained instantly on all table structures. Onceretrieved, this dictionary information is then manipulated using theaforementioned predefined templates 22 to generate error-free scripts16.

In one embodiment of the present invention, the remote server 18receives information from the database 24, and a user applies thedatabase information to various programs, such as inventory reports. Inan alternate embodiment, the user designs templates on the remote server18 and extracts dictionary information for use in the templates. Theremote server 18 may include an alternate script generator or may belinked to the script generator 12.

Referring to FIG. 2, a logic flow diagram of a method 100 for automatingsystem administration operations is illustrated. Logic starts inoperation block 102 where a programmer creates templates 22 usinginformation from the database dictionary 20.

In operation block 104, either the programmer or a user at a remoteserver 18 chooses the database type with which to run one of thetemplates 22. In operation block 106, the desired procedure is selected,and various templates 22 for implementing the procedure are incorporatedwithin the procedure script.

In operation block 108, the procedure is displayed in its entirety. Inoperation block 110, the procedure is FTP (file transfer protocol) tovarious systems requiring the procedure or aspects of the procedure. Inoperation 112, the procedure is run on either the server 14 or a remoteserver 18.

In operation, the method for generating a script 16 includes running abuilt-in macro for RDBMS architecture dictionary retrieval, andextracting table structure data from a RDBMS architecture dictionary 20.The table structure data is then converted into an alternate programminglanguage file layout, such as COBOL, and arranged within a predefinedtemplate 22. Ultimately, a script is generated from the predefinedtemplate 22.

From the foregoing, it can be seen that there has been brought to theart a new script generating system 10. It is to be understood that thepreceding descriptions of various embodiments are merely illustrative ofsome of the many specific embodiments that represent applications of theprinciples of the present invention. Numerous and other arrangementswould be evident to those skilled in the art without departing from thescope of the invention as defined by the following claims.

1. A method comprising: receiving data from a user indicating aselection of a procedure; automatically selecting at least one templateto implement the procedure; extracting table structure informationrelated to the procedure from a database management system dictionary;manipulating the table structure information; and automaticallyincorporating the manipulated table structure information into the atleast one template to generate a modified template.
 2. The method ofclaim 1, further comprising creating the at least one template.
 3. Themethod of claim 1, further comprising selecting a database type thatincludes the database management system dictionary.
 4. The method ofclaim 1, wherein the table structure information is extracted from thedatabase management system dictionary via at least one macro,
 5. Thesystem of claim 4, wherein the at least one macro retrieves the databasemanagement system dictionary from a database management system (DBMS).6. The system of claim 5, wherein the database management system is arelational database management system (RDBMS).
 7. The system of claim 5,wherein the database management system is a Teradata database managementsystem.
 8. The method of claim 1, further comprising automaticallygenerating a script to implement the procedure, wherein the script callsa first template of the at least one template as a variable into asecond template of the at least one template.
 9. The method of claim 1,wherein the database management system dictionary is associated with adatabase management system, and wherein the database management systemhas a parallel architecture.
 10. The method of claim 1, furthercomprising generating a procedure script to implement the procedure,wherein the procedure script includes the modified template.
 11. Themethod of claim 10, further comprising displaying the procedure script.12. The method of claim 10, further comprising transmitting theprocedure script via a file transfer protocol (FTP) to a destination.13. The method of claim 1, further comprising converting the tablestructure information into an alternate programming language file layoutprior to incorporating the manipulated table structure information intothe at least one template.
 14. The method of claim 13, wherein thealternate programming language file layout is compatible with the CommonBusiness Oriented Language (COBOL) programming language.
 15. The methodof claim 1, wherein the at least one template comprises one of: an autoload feature to auto load a specific file; a create duplicate copyfeature, the create duplicate copy feature to generate a backup copyfrom a dictionary table layout; a multi-load delete feature; a templatefor collecting statistics on columns and upfront optimizations; atemplate with a syntax that purges data from a table or anothertemplate; a template including a secondary index that allows storing ofdata at a particular table or removing data from the particular table; atemplate to replace or update a particular template with a new template;and a template to filter out data.
 16. A script generating systemcomprising: a server including logic adapted to receive data indicatinga selection of a procedure; wherein, in response to receiving the data,the logic is adapted to: automatically select at least one template toimplement the procedure; extract table structure information related tothe procedure from a database management system dictionary; manipulatethe table structure information; and automatically incorporate themanipulated table structure information into the at least one template.17. The system of claim 16, wherein the logic is further adapted toautomatically generate a script to implement the procedure using the atleast one template.
 18. The system of claim 16, wherein the tablestructure information includes a column name, a data type, format data,a default value, a primary index, a secondary index, a column statistic,a view, or any combination thereof.
 19. A computer-readable mediumincluding instructions executable by a processor, which when executedcause the processor to: receive data from a user indicating a selectionof a procedure; automatically select at least one template from aplurality of templates to implement the procedure; extract tablestructure information related to the procedure from a databasemanagement system dictionary; convert the table structure informationinto a file having an alternate language file layout; and automaticallyincorporate the converted table structure information in the file intothe at least one selected template.
 20. The computer-readable medium ofclaim 19, further comprising instructions executable by the processor toinclude a pre-defined template into the plurality of templates.